package io.mvvm.controller;

import io.mvvm.client.DemoClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: spring-cloud-alibaba
 * @description:
 * @author: 潘
 * @create: 2020-10-08 01:18
 **/
@RestController
public class DemoController {

    @Resource
    private DemoClient demoClient;

    @GetMapping("/consumer/{str}")
    public String get(@PathVariable("str") String str){
        System.out.println("consumer");
        String client = demoClient.get(str);
        System.out.println("------" + client + "-------");
        return client;
    }

}
